%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/pg11.identity"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 13, 14<br /><br />1: PgInsertSingle[10]<br />2: <br />ᐳ: Object[15]"):::bucket
    Bucket2("Bucket 2 (mutationField)<br />Deps: 22, 2<br /><br />1: Access[19]<br />2: Access[20]<br />3: Object[21]<br />4: PgInsertSingle[18]<br />5: <br />ᐳ: Object[23]"):::bucket
    Bucket3("Bucket 3 (mutationField)<br />Deps: 31, 2<br /><br />1: Access[28]<br />2: Access[29]<br />3: Object[30]<br />4: PgInsertSingle[27]<br />5: <br />ᐳ: Object[32]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 15, 10<br /><br />ROOT Object{1}ᐸ{result}ᐳ[15]"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 23, 18<br /><br />ROOT Object{2}ᐸ{result}ᐳ[23]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 32, 27<br /><br />ROOT Object{3}ᐸ{result}ᐳ[32]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 10<br /><br />ROOT PgInsertSingle{1}ᐸalways_as_identity()ᐳ[10]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 18<br /><br />ROOT PgInsertSingle{2}ᐸby_default_as_identity()ᐳ[18]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 27<br /><br />ROOT PgInsertSingle{3}ᐸby_default_as_identity()ᐳ[27]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3
    Bucket1 --> Bucket4
    Bucket2 --> Bucket5
    Bucket3 --> Bucket6
    Bucket4 --> Bucket7
    Bucket5 --> Bucket8
    Bucket6 --> Bucket9

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸ'test'ᐳ[42]"}}:::plan
    __InputObject8 --> __InputObject6
    Object13{{"Object[13∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access11{{"Access[11∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access11 & Access12 --> Object13
    __InputObject16{{"__InputObject[16∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject17{{"__InputObject[17∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'test'ᐳ[42]"}}:::plan
    __InputObject17 --> __InputObject16
    __InputObject24{{"__InputObject[24∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject25{{"__InputObject[25∈0] ➊<br />More deps:<br />- Constantᐸ100ᐳ[43]<br />- Constantᐸ'test'ᐳ[42]"}}:::plan
    __InputObject25 --> __InputObject24
    ApplyInput14{{"ApplyInput[14∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput14
    ApplyInput22{{"ApplyInput[22∈0] ➊"}}:::plan
    __InputObject16 --> ApplyInput22
    ApplyInput31{{"ApplyInput[31∈0] ➊"}}:::plan
    __InputObject24 --> ApplyInput31
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 6"]:::plan
    PgInsertSingle10[["PgInsertSingle[10∈1] ➊<br />ᐸalways_as_identity()ᐳ"]]:::sideeffectplan
    Object13 & ApplyInput14 --> PgInsertSingle10
    Object15{{"Object[15∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle10 --> Object15
    PgInsertSingle18[["PgInsertSingle[18∈2] ➊<br />ᐸby_default_as_identity()ᐳ"]]:::sideeffectplan
    Object21{{"Object[21∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Object21 & ApplyInput22 --> PgInsertSingle18
    Access19{{"Access[19∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access20{{"Access[20∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access19 & Access20 --> Object21
    Object23{{"Object[23∈2] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle18 --> Object23
    PgInsertSingle27[["PgInsertSingle[27∈3] ➊<br />ᐸby_default_as_identity()ᐳ"]]:::sideeffectplan
    Object30{{"Object[30∈3] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Object30 & ApplyInput31 --> PgInsertSingle27
    Access28{{"Access[28∈3] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access29{{"Access[29∈3] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access28 & Access29 --> Object30
    Object32{{"Object[32∈3] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle27 --> Object32
    PgClassExpression33{{"PgClassExpression[33∈7] ➊<br />ᐸ__always_a...ity__.”id”ᐳ"}}:::plan
    Access34{{"Access[34∈7] ➊<br />ᐸ10.tᐳ"}}:::plan
    Access34 --> PgClassExpression33
    PgInsertSingle10 --> Access34
    PgClassExpression39{{"PgClassExpression[39∈7] ➊<br />ᐸ__always_a...tity__.”t”ᐳ"}}:::plan
    PgClassExpression33 o--o PgClassExpression39
    PgClassExpression35{{"PgClassExpression[35∈8] ➊<br />ᐸ__by_defau...ity__.”id”ᐳ"}}:::plan
    Access36{{"Access[36∈8] ➊<br />ᐸ18.tᐳ"}}:::plan
    Access36 --> PgClassExpression35
    PgInsertSingle18 --> Access36
    PgClassExpression40{{"PgClassExpression[40∈8] ➊<br />ᐸ__by_defau...tity__.”t”ᐳ"}}:::plan
    PgClassExpression35 o--o PgClassExpression40
    PgClassExpression37{{"PgClassExpression[37∈9] ➊<br />ᐸ__by_defau...ity__.”id”ᐳ"}}:::plan
    Access38{{"Access[38∈9] ➊<br />ᐸ27.tᐳ"}}:::plan
    Access38 --> PgClassExpression37
    PgInsertSingle27 --> Access38
    PgClassExpression41{{"PgClassExpression[41∈9] ➊<br />ᐸ__by_defau...tity__.”t”ᐳ"}}:::plan
    PgClassExpression37 o--o PgClassExpression41

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,Access11,Access12,Object13,ApplyInput14,__InputObject16,__InputObject17,ApplyInput22,__InputObject24,__InputObject25,ApplyInput31 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle10,Object15 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgInsertSingle18,Access19,Access20,Object21,Object23 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgInsertSingle27,Access28,Access29,Object30,Object32 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7,PgClassExpression33,Access34,PgClassExpression39 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgClassExpression35,Access36,PgClassExpression40 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression37,Access38,PgClassExpression41 bucket9

